import axios from '@/utils/axios'
// 登录
export const postLogin = (data) => {
  return axios({
    url: '/mp/v1_0/authorizations',
    method: 'POST',
    data
  })
}
// 获取用户信息
export const getUserInfo = () => {
  return axios.get('/mp/v1_0/user/profile')
}
// 获取粉丝列表
export const getFansList = (params) => {
  return axios({
    url: '/mp/v1_0/followers',
    method: 'GET',
    params
  })
}
// 获取粉丝分类
export const getFansFollowers = () => {
  return axios.get('/mp/v1_0/statistics/followers')
}
// 更新用户信息
export const editUserInfo = (data) => {
  return axios({
    url: '/mp/v1_0/user/profile',
    method: 'PATCH',
    data
  })
}
// 更新用户头像
export const editUserAvatar = (data) => {
  return axios({
    url: '/mp/v1_0/user/photo',
    method: 'PATCH',
    data
  })
}
